package com.k7.mobile.platform.dao.impl;

import java.util.List;

import com.k7.mobile.platform.dao.ITypeDAO;
import com.k7.mobile.platform.dataobject.TypeDO;


public class TypeDAOImpl extends BaseDAOImpl implements ITypeDAO{

	@Override
	public Long add(TypeDO typeDO) {
		
		Object id = getSqlMapClientTemplate().insert("TYPE-ADD", typeDO);
		return (Long) id;
	}
	
	@Override
	public void delete(TypeDO typeDO) {
		
		this.getSqlMapClientTemplate().delete("TYPE-DEL", typeDO);
		
	}

	@Override
	public void update(TypeDO typeDO) {
		
		this.getSqlMapClientTemplate().update("TYPE-UPDATE", typeDO);
		
	}

	@Override
	public List<TypeDO> findList(TypeDO typeDO) {
		
		return this.executeQueryForList("FIND-TYPE-LIST","FIND-TYPE-LIST-COUNT",  typeDO);
	}

	@Override
	public TypeDO getType(TypeDO typeDO) {
		return (TypeDO) this.getSqlMapClientTemplate().queryForObject("GET-TYPE", typeDO);
	}


}
